<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<link type="text/css" rel="stylesheet" href="{TPL}css/NewTopFoot.css"  />
<link type="text/css" rel="stylesheet" href="{TPL}css/ShoppingCart.css"/>
<script src="{TPL}js/jquery-1.4.1.min.js" type="text/javascript"></script>
<script type="text/javascript" src="{TPL}js/ShoppingCart.js"></script>
<title>{lang m_my_cart}-{lang g_webname}</title>
    <style type="text/css">
		.blink {
			color: #FFF !important;
			background: #FC79CE;
			!important;
		}
    </style>

<link href="{TPL}newedit/css/cart.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
function clickplus() {
	//window.localStorage.removeItem("dg_loginauth");
   
}
		$(document).ready(function () {

			//call the blink function on the element you want to blink
			blink("#myDiv", 2, 600); //blink a div with the ID of myDiv
		});

		/**
		 * Purpose: blink a page element
		 * Preconditions: the element you want to apply the blink to, the number of times to blink the element (or -1 for infinite times), the speed of the blink
		 **/
		function blink(elem, times, speed) {
			if (times > 0 || times < 0) {
				if ($(elem).hasClass("blink")) 
					$(elem).removeClass("blink");
				else
					$(elem).addClass("blink");
			}

			clearTimeout(function () {
				blink(elem, times, speed);
			});

			if (times > 0 || times < 0) {
				setTimeout(function () {
					blink(elem, times, speed);
				}, speed);
				times -= .5;
			}
		}
</script>

        <script type="text/javascript">
            function calvplus(id){
			var resid = "t_" + id;
            var abc = $("#"+resid).val();
			var newabc = +$("#"+resid).val() + 1;
			$("#"+resid).val(newabc);
			$("#"+resid).blur();
            }
            function calvminus(id){
			var resid = "t_" + id;
            var abc = $("#"+resid).val();
			var newabc = +$("#"+resid).val() - 1;
			$("#"+resid).val(newabc);
			$("#"+resid).blur();
            }
        </script>
</head>
<body>
{template 'header'}
<form id="form1" action="payconfirm.php" onsubmit="return thisPage.submitCheck();" method="post">

<div class="box">
<div class="cart_main" id="pagemain">
  <div class="weizhi"> <a style="float: right; margin-right: 35px;" href="{url_m.php}">{lang u_member_center}</a> <b>{lang m_location}：</b><a href="/">{lang h_index}</a><span>&gt;</span>{lang m_my_cart}</div>
{if !empty($temparray)}

  <div class="bt" style="background:#666">
    <ul>
		<!--<li style="margin-right:10px">
		<label for="check_all_1" onclick="selectAll(document.wizard_form, this);">
		<input type="checkbox" value="true" name="select-all" id="SelectAll_bx" class="check_box_shop">{lang js_allselect}
		</label>
		</li>-->
      <li class="w1">{lang s_goods_info}</li>
      <li class="w2">{lang s_price}{lang s_price_ext}</li>
      <li class="w3">{lang s_num}</li>
      <li class="w4">{lang s_total}{lang s_price_ext}</li>
      <li class="w5">
        <div id="yunfei" class="yunfei">
          <p> {lang s_seller_ship_fee_instr}!</p>
          <button onclick="$('#yunfei').hide();return false;"> </button>
        </div>
        <span>{lang s_national_ship_fee}</span><a onclick="$('#yunfei').show();" href="javascript:;"></a></li>
      <li class="w6">{lang s_note}</li>
    </ul>
  </div>
  <div id="shoppingCartProduct" class="product">
  {loop $temparray $sname $value}
    <table>
      <tbody>
	   {loop $value $key $r}
        <tr id="li{$r['gid']}">
          <td class="b1"><input type="checkbox" checked="checked" value="{$r['gid']}" onclick="thisPage.accountAll()" name="gids[]">
          </td>
          <td class="b2"><a target="_blank" href="{$r['goodsurl']}"><img onerror="this.src='{TPL}images/noimg80.gif'" src="{$r['goodsimg']}"></a></td>
          <td class="b3"><p><a target="_blank" href="{$r['goodsurl']}">{$r['goodsname']}</a></p></td>
          <td class="b4">{lang s_price_ext}{$r['goodsprice']}</td>
          <td class="order_amount">
		   
		   <table style="border:white">
		   
		   <tr>
		   <td style="border:white"><a href="javascript:calvminus('{$r['gid']}');" class="minus" id="minus_{$r['gid']}">-</a></td>
		
		   
		   <td class="b5" style="border:white"><input readonly="true" type="text" value="{$r['goodsnum']}" onkeyup="value=value.replace(/[^\d]/g,'')" onblur="thisPage.updateNum({$r['gid']},this.value)" maxlength="4" class="item_num" id="t_{$r['gid']}" ></td>
                     
		   <td style="border:white"><a href="javascript:calvplus('{$r['gid']}');" class="plus" id="plus_{$r['gid']}">+</a></td>
		
			</tr></table>
          </td>
          <td class="b6"><span>{eval if($r['type']==1)echo "{lang s_price_ext}".$r['goodsprice']*$r['goodsnum'];else echo "[{lang s_help_send_goods}]"}</span> </td>
		  {if $key==0}
          <td rowspan="{eval echo count($value)}" class="b7" id="sj0">{lang s_price_ext}{$s[$sname]} </td>
		  {/if}
		  <td class="b8"><a title="{$r['goodsremark']}" onclick="thisPage.showRemarkPanel({$r['gid']},false,this,'{$r['goodsremark']}')" onmouseover="thisPage.showRemarkPanel({$r['gid']},true,this,'{$r['goodsremark']}')" onmouseout="thisPage.cleartoID(thisPage.toID);if($('.beizhu').length&gt;0)thisPage.outID.push(setTimeout(function() {thisPage.closeRemarkPanel();}, 500));" class="orange">{lang s_add_note}</a> </td>
        </tr>
		{/loop}
        <tr>
          <td colspan="8" class="sj">{lang s_seller}：
		  <a target="_blank" title="{$r['goodsseller']}" href="{$r['sellerurl']}">{$r['goodsseller']}</a>
		  <span>{lang s_source_site}:{$r['goodssite']}</span></td>
        </tr>
      </tbody>
    </table>
	{/loop}
	
	    <div id="myDiv" style="font-size:14px;color:blue;margin-top:5px;padding-top:10px;padding-left:5px;padding-bottom:10px;border:1px dashed red">
			<b style="color:red;">{lang m_ship_ty} ({lang s_dgou_useonly}): </b>
			<label><input  style="width:15px;float:none;" type="radio" id="checkid2" value="普通空运" name="deliver_using" checked="checked">{lang m_ship_air}</label> &nbsp;
			<label><input  style="width:15px;float:none;" type="radio" id="checkid3" value="敏感空运" name="deliver_using">{lang m_ship_air_hot}</label>&nbsp;
			<label><input  style="width:15px;float:none;" type="radio" id="checkid1" value="海运" name="deliver_using">{lang m_ship_sea_common} / {lang m_ship_sea_hot}</label> &nbsp;
		</div>
            <div class="cart_bar m_t_20">
            	<div class="left">
                     <a onclick="$('input[type=checkbox]').attr('checked',true);thisPage.accountAll();" href="javascript:;"> {lang s_selectall}</a>
					 -
					 <a id="reSelete" onclick="$('input[type=checkbox]').each(function(){this.checked=!this.checked;});thisPage.accountAll();" href="javascript:;">{lang s_selectreverse}</a>               
				<span style="margin-left:5px;"><a style="color:#f40" href="javascript:;" onclick="thisPage.del(this)">{lang s_delete}</a></span>
				<span><a style="color:#f40"  href="javascript:;" onclick="thisPage.addToFavorites(this);">{lang s_add_favorite}</a></span>
                </div>
                <div class="right" style="margin:20px 0;">
                	<span>{lang s_total}:<i id="totalProPrice">{lang s_price_ext}{$countdata['goodsmoney']}</i></span>
					<span>+{lang s_total_ship_fee}:<i id="totalFreight">{lang s_price_ext}{$countdata['sendmoney']}</i></span>
                    <span>{lang s_total_need_pay}：<i id="totalPrice">{lang s_price_ext}{$countdata['totalmoney']}</i></span>
                    <input type="submit" class="cart_btn cart_btn_hover" value="{lang h_checkout}">
                </div>
            </div>
			
	      <div class="yuer" style="float:rigth;margin-right:100px;display:none">
			
			<div class="btn_topup" align="center">
				<a target="_blank" href="{url_m.php?name=rmbaccount}">{lang s_recharge_now}</a>
			</div>
			{lang s_rmb_accout_left}：<i>{lang s_price_ext}{$_USERS['money']} </i>
		</div>

    <div class="next">
      <p> <a target="_blank" href="{url_m.php?name=favorite}">{lang s_go_my_favorite}</a>&nbsp;&nbsp;&nbsp;&nbsp;</p>
      
    </div>
  </div>
  {else}
  
  
  <div class="nought">
              <h2>
                  {lang s_cart_empty}!</h2>
              <p>
                  {lang u_going_do}：<a href="{url_see.php}">{lang u_look_around}</a> <a href="cangwei.php">{lang s_look_around_space}</a></p>
			
              <div>
                    {lang m_tips}：{lang s_cart_empty_no_login}！<a href="{url_user.php?action=login}">{lang s_login_now}</a></div>
              
  </div>
  {/if}
  
  
</div>
<div class="cart_bottom"></div>
</div>
</form>

<div class="clear"></div>
{template 'footer'}
</body>
</html>
